package com.hspedu.enum_;

/**
 * @author 谷其昊
 * @version 1.0
 * @date 2022/1/29
 * @time 17:17
 */
public class EnumExercise02 {
    public static void main(String[] args) {
        Music.CLASSICALMUSIC.play();
    }
}

interface PlayMusic{
    void play();
}
@SuppressWarnings({"all"})
enum Music implements PlayMusic{
    CLASSICALMUSIC;


    @Override
    public void play() {
        System.out.println("开始播放音乐");
    }
}
